package com.jesper.model;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.Date;

@Data
@TableName("tb_item")
public class Item extends BaseObject {
    @ColumnWidth(50)  // 定义宽度
    @ExcelProperty("商品id")
    private Long id;//编号
    @ExcelProperty("商品名称")
    private String title;//题目，名称
    @ExcelProperty("卖点")
    private String sellPoint;//卖点（好直接的翻译）
    @ExcelProperty("价格")
    private int price;//价格
    @ExcelProperty("库存")
    private int num;//存货量
    @ExcelProperty("条形码")
    private String barcode;//条形码
    @ExcelProperty("图片")
    private String image;//图片
    @ExcelProperty("单号")
    private Long cid;//单号
    @ExcelProperty("状态")
    private int status;//状态
    @ExcelProperty("生成日期")
    private Date created;//生产日期
    @ExcelProperty("修改日期")
    private Date updated;//修改日期

    @TableField(exist = false)
    private String createdStr;//修改日期字符串
    @TableField(exist = false)
    private String updatedStr;//更改日期字符串
    @TableField(exist = false)
    private String categoryName;
    @TableField(exist = false)
    private Integer minPrice;
    @TableField(exist = false)
    private Integer maxPrice;
    @TableField(exist = false)
    private Integer minNum;
    @TableField(exist = false)
    private Integer maxNum;

}
